<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="Content-Language" content="zh-CN">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="shop">
    <meta name="author" content="letsun">

    <title>新增订单</title>

    <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="../plugs/fontAwesome/4.6.3/css/font-awesome.min.css"/>
    <link rel="stylesheet" type="text/css" href="../css/jquery.gritter.css">
    <link rel="stylesheet" type="text/css" href="../css/bootstrap-sticky-footer.css">
    <link rel="stylesheet" type="text/css" href="../css/bootstrap-fix.css">
    <link rel="stylesheet" type="text/css" href="../css/foot.css">

    <script src="../js/jquery.min.js"></script>
    <script src="../js/bootstrap.min.js"></script>
    <script src="../js/jquery.gritter.min.js"></script>
    <script src="../js/jquery.gritter.min.extend.js"></script>
</head>


<body>
<nav class="navbar navbar-default navbar-static-top navbar-shortcut">
    <div class="container">
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right navbar-nav-jd">
                <li>
                    <a href="http://192.168.1.42:8888/shop-pc/setting/profile" class="link-user">您好,18720989381</a>
                </li>
                <li>
                    <a href="http://192.168.1.42:8888/shop-pc/logout" class="link-logout">退出</a>
                </li>
                <li>
                    <a target="_blank" href="http://192.168.1.42:8888/shop-pc/manage/order">我的订单</a>
                </li>
            </ul>
        </div><!--/.nav-collapse -->
    </div>
</nav>
<!--- 导航： begin -->
<div id="nav">
    <div class="w container">
        <!-- logo begin -->
        <div class="logo">
            <a href="http://192.168.1.42:8888/shop-pc/" target="_blank" class="fore1"></a>
            <a href="http://192.168.1.42:8888/shop-pc/setting/profile" target="_self" class="fore2">我的淘惠帮</a>
            <a href="http://192.168.1.42:8888/shop-pc/" target="_blank" class="fore3">返回淘惠帮</a>
        </div>
        <!-- logo end -->

        <div class="pull-right">
            <form class="navbar-form navbar-left navbar-form-jd" role="search" action="http://192.168.1.42:8888/shop-pc/goods/search">
                <div class="form-group">
                    <input type="text" class="form-control" name="search_CN_title" placeholder="水果">
                </div>
                <button type="submit" class="btn btn-default">搜索</button>
                <a href="http://192.168.1.42:8888/shop-pc/cart" class="btn btn-default">购物车</a>
            </form>

        </div>
    </div>
</div>
<!--- 导航： end -->

<div class="container">
    <div class="row">
        <div class="col-md-1">
            <div class="menu">
                <ul class="list-unstyled">
                    <li>
                        <a href="http://192.168.1.42:8888/shop-pc/setting/profile">个人信息</a>
                    </li>
                    <li>
                        <a href="http://192.168.1.42:8888/shop-pc/manage/address">我的地址</a>
                    </li>
                    <li class="active">
                        <a href="http://192.168.1.42:8888/shop-pc/manage/order">订单信息</a>
                    </li>
                    <li>
                        <a href="http://192.168.1.42:8888/shop-pc/manage/goodscomment">我的评价</a>
                    </li>
                    <li>
                        <a href="http://192.168.1.42:8888/shop-pc/manage/goodscollect">我的收藏</a>
                    </li>
                    <li>
                        <a href="http://192.168.1.42:8888/shop-pc/setting/password">修改密码</a>
                    </li>
                    <li>
                        <a href="http://192.168.1.42:8888/shop-pc/cart">购物车</a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="col-md-11">

            <!-- page-header -->
            <div class="page-header">
                <div class="page-comm">
                    <div class="mt">
                        <h3>创建订单</h3>
                    </div>
                    <div class="mc">
                        <!--
                        <a href="/shop-pc/manage/address/select">
                            <p class="address-title">请选择收货人地址: <span style="float:right"><i class="fa fa-angle-right"></i></span></p>
                        </a>
                        <div class="order-address">
                            <div class="clearfix">
                                <div class="pull-left">默认地址:邱宇航 , 广东省深圳市市辖区宝安区 西乡街道 f518时尚创意园 14栋401</div>
                                <div class="pull-right"><i class="fa fa-mobile"></i>18720989381</div>
                            </div>
                        </div>
                        -->
                    </div>
                </div>
            </div>
            <!-- /.page-header -->

            <div class="page-content">
                <div class="page-comm">

                    <div class="order-pay" style="width:100%;background:#FFF;margin:10px 0;">
                        <div class="pay-panel" style="padding:10px;text-align:left">
                            <div style="border-left:4px solid #FF3333;padding-left:20px;color:#666;font-size:16px;margin-bottom:5px;" class="clearfix">
                                <div class="pull-left"> 收货地址 :邱宇航 , 广东省深圳市市辖区宝安区 西乡街道 f518时尚创意园 14栋401,18720989381</div>
                                <div class="pull-right">
                                    <a href="http://192.168.1.42:8888/shop-pc/manage/address/select" style="font-weight:bold;color:#005ea7">更多地址</a>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="order-pay" style="width:100%;background:#FFF;margin:10px 0;">
                        <div class="pay-panel" style="padding:10px;text-align:left">
                            <p style="border-left:4px solid #FF3333;padding-left:20px;color:#666;font-size:16px;margin-bottom:5px;">
                                支付方式 : 在线付款</p>
                        </div>
                    </div>

                    <div class="order-delivery" style="width:100%;background:#FFF;margin:10px 0;">
                        <div class="delivery-panel" style="padding:10px;text-align:left">
                            <p style="border-left:4px solid #FF3333;padding-left:20px;color:#666;font-size:16px;margin-bottom:5px;">
                                配送方式 : 送货上门</p>
                        </div>
                    </div>

                    <!--订单信息开始-->
                    <div class="order-content">
                        <table class="table">
                            <tbody>
                            <tr>
                                <th>商品</th>
                                <th width="60">数量</th>
                                <th width="100" class="text-right">单价</th>
                            </tr>
                            <tr>
                                <td>
                                    <img src="../images/20150319162748322.jpg" style="width:50px;height:50px;">
                                    河北皇冠梨2.5kg
                                </td>

                                <td>
                                    <span class="info-num">x1</span>
                                </td>
                                <td class="text-right">
                                    <span class="info-gold"><em class="price">￥19.9</em></span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <img src="../images/20130522145012374.jpg" style="width:50px;height:50px;">
                                    香气浓，味道好
                                </td>

                                <td>
                                    <span class="info-num">x1</span>
                                </td>
                                <td class="text-right">
                                    <span class="info-gold"><em class="price">￥0.01</em></span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <img src="../images/1426666828173.jpg" style="width:50px;height:50px;">
                                    墨西哥牛油果8个
                                </td>

                                <td>
                                    <span class="info-num">x1</span>
                                </td>
                                <td class="text-right">
                                    <span class="info-gold"><em class="price">￥130</em></span>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <!--订单信息结束-->

                    <!--订单核算开始-->
                    <div class="ordre-summary" style="background:#FFF;text-align:left;padding:10px">
                        <p style="border-bottom:1px solid #ddd;height:30px;line-height:30px;">
                            <span style="color:#666;font-size:14px;">商品金额</span>
                            <span class="info-num" style="float:right;"><em class="price">￥149.91</em></span>
                        </p>
                        <p style="height:30px;line-height:30px;">
                            <span style="color:#666;font-size:14px;">运费</span>
                            <span class="info-gold" style="float:right;">0.00</span>
                        </p>
                    </div>
                    <!--订单核算结束-->

                    <div class="clearfix">
                        <!--
                        <div class="pull-left" >
                            <span style="color:#666;margin-left:10px;">实付款：149.91元</span>
                        </div>
                        -->
                        <div class="pull-right">
                            <span style="margin-right:10px;">应付总额：<em class="price">￥149.91</em></span>
                            <a class="btn btn-danger " onclick="submitOrder()" id="submitBtn">提交订单</a>
                        </div>
                    </div>

                </div>
            </div>
            <!-- /.page-content -->

            <form id="validation-form" method="post" action="http://192.168.1.42:8888/shop-pc/manage/order/create">
                <input type="hidden" name="orderItemList[0].goods.id" value="2">
                <input type="hidden" name="orderItemList[0].goods.title" value="河北皇冠梨2.5kg">
                <input type="hidden" name="orderItemList[0].price" value="19.9">
                <input type="hidden" name="orderItemList[0].amount" value="1">
                <input type="hidden" name="orderItemList[0].status" value="1">
                <input type="hidden" name="orderItemList[1].goods.id" value="4">
                <input type="hidden" name="orderItemList[1].goods.title" value="香气浓，味道好">
                <input type="hidden" name="orderItemList[1].price" value="0.01">
                <input type="hidden" name="orderItemList[1].amount" value="1">
                <input type="hidden" name="orderItemList[1].status" value="1">
                <input type="hidden" name="orderItemList[2].goods.id" value="10">
                <input type="hidden" name="orderItemList[2].goods.title" value="墨西哥牛油果8个">
                <input type="hidden" name="orderItemList[2].price" value="130">
                <input type="hidden" name="orderItemList[2].amount" value="1">
                <input type="hidden" name="orderItemList[2].status" value="1">
                <!-- paytype: 1支付宝 2微信 -->
                <input type="hidden" name="paytype" value="1">
                <input type="hidden" name="shipment" value="1">
                <input type="hidden" name="total" value="149.91">
                <input type="hidden" name="amount" value="3">
                <input type="hidden" name="receiverName" value="邱宇航">
                <input type="hidden" name="address" id="address" value="广东省深圳市市辖区宝安区 西乡街道 f518时尚创意园 14栋401">
                <input type="hidden" name="mobile" value="18720989381">
                <input type="hidden" name="remark" value="">
                <input type="hidden" name="member.id" value="82">
                <input type="hidden" name="corp.id" value="2">
                <input type="hidden" name="provinceid" value="440000">
                <input type="hidden" name="cityid" value="440300">
                <input type="hidden" name="areaid" value="440301">
                <!-- --------------fixxxxxxxxxxxxxxxxxxxxxxxx--------- -->
            </form>

        </div>
    </div>
</div>

<!--service: 服务  begin-->
<div class="service-area">
    <div class="slogen-panel">
        <ul>
            <li><a href="http://192.168.1.42:8888/shop-pc/manage/order/create?#"><img src="../images/b_1.png"> <h4>
                品质保证</h4>
                <p>货到付款</p></a></li>
            <li><a href="http://192.168.1.42:8888/shop-pc/manage/order/create?#"><img src="../images/b_2.png"> <h4>
                七天无理由退换</h4>
                <p>国免邮</p></a></li>
            <li><a href="http://192.168.1.42:8888/shop-pc/manage/order/create?#"><img src="../images/b_3.png"> <h4>
                特色服务体验</h4>
                <p>自营冷链全国配送</p></a></li>
            <li><a href="http://192.168.1.42:8888/shop-pc/manage/order/create?#"><img src="../images/b_4.png"> <h4>
                有机农场</h4>
                <p>新蔬直供</p></a></li>
            <li><a href="http://192.168.1.42:8888/shop-pc/manage/order/create?#"><img src="../images/b_4.png"> <h4>
                帮助中心</h4>
                <p>国免邮</p></a></li>
        </ul>
    </div>

    <div class="service-panel">
        <dl class="service-item cot5">
            <dt>食品安全</dt>
            <dd>
                <!-- 遍历父节点为pid的全部节点 -->
                <div><a href="http://www.sxmmd.com/help/2">有机农场</a></div>
                <div><a href="http://www.sxmmd.com/help/3">采购标准</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/4">食品信息公开透明</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/5">透明社区经营理念</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/6">我们的资质</a></div>
            </dd>
        </dl>

        <dl class="service-item cot5">
            <dt>新手教程</dt>
            <dd>
                <!-- 遍历父节点为pid的全部节点 -->
                <div><a href="http://192.168.1.42:8888/shop-pc/help/8">购物流程</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/9">注册登录</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/10">账户充值</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/11">如何提货</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/12">会员政策</a></div>
            </dd>
        </dl>

        <dl class="service-item cot5">
            <dt>配送方式</dt>
            <dd>
                <!-- 遍历父节点为pid的全部节点 -->
                <div><a href="http://192.168.1.42:8888/shop-pc/help/14">自营全程冷链配送</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/15">配送范围</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/16">运费标准</a></div>
            </dd>
        </dl>

        <dl class="service-item cot5">
            <dt>支付方式</dt>
            <dd>
                <!-- 遍历父节点为pid的全部节点 -->
                <div><a href="http://192.168.1.42:8888/shop-pc/help/18">货到付款</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/19">在线支付</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/20">账户余额支付</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/21">退款说明</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/22">多种福利卡</a></div>
            </dd>
        </dl>

        <dl class="service-item cot5">
            <dt>售后服务</dt>
            <dd>
                <!-- 遍历父节点为pid的全部节点 -->
                <div><a href="http://192.168.1.42:8888/shop-pc/help/24">退换货政策</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/25">退换货流程</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/26">发票制度</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/27">投诉建议</a></div>
            </dd>
        </dl>

        <dl class="service-item cot5">
            <dt>帮助信息</dt>
            <dd>
                <!-- 遍历父节点为pid的全部节点 -->
                <div><a href="http://192.168.1.42:8888/shop-pc/help/29">安全食品采购指南</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/30">常见问题</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/31">电子优惠券的使用</a></div>
                <div><a href="http://192.168.1.42:8888/shop-pc/help/32">礼品卡</a></div>
            </dd>
        </dl>
    </div>
</div>
<!--service: 服务 end -->

<!-- footer:页脚  begin -->
<div class="footer">
    <div class="foot-panel">
        <div style="float:left;width:70%;text-align:right;">
            <p>免费热线：400-168-9979</p>
            <p>电子邮箱：bj@letsun.com.cn</p>
            <p>Copyright&nbsp;©&nbsp;2015-2016 立信创源 &nbsp;&nbsp;ww.letsun.com.cn &nbsp;版权所有</p>
            <p>Power by 粤ICP备13083109号</p>
        </div>
        <div style="float:right;width:30%;text-align:center;">
            <img src="../images/down_m.png" style="width:100px;height:100px;">
            <img src="../images/weixian_er.png" style="width:100px;height:100px;">
        </div>
    </div>
</div>
<!-- footer:页脚  end -->

<script type="text/javascript">
    var $path = "/shop-pc";
</script>

<script>
    function submitOrder() {
        //验证
        var address = $("#address").val();
        if (address == "") {
            alertSuccess("请添加收货人地址");
            return false;
        }

        //链接失效
        $('#submitBtn').attr("disabled", true);

        //创建订单
        createOrder();

        //$("#validation-form").submit();
    }

    function createOrder() {
        $.ajax({
            type: "post",
            url: "/shop-pc/manage/order/create",
            data: $("#validation-form").serialize(),
            success: function (data) {
                if (data.code == 200) {
                    window.location.href = "/shop-pc/alipay/gopay/" + data.result;
                } else if (data.code == 300) {
                    //商品库存不足
                    alertDanger(data.msg);
                } else {
                    alertDanger("系统错误,请联系管理员");
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                alertDanger('网络异常');
            }
        })
    }
</script>
</body>
</html>